package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.ICostOtherDao;
import com.jemmyee.pizza.entity.CostOther;

@Repository("costOtherService")
public class CostOtherServiceImpl implements ICostOtherService<CostOther>{

	private static final Log log = LogFactory.getLog(CostOtherServiceImpl.class) ;
	@Autowired
	private ICostOtherDao costOtherDao ;
	
	public void delete(CostOther entity) {
		costOtherDao.delete(entity) ;
	}

	public void deleteAll(List<CostOther> list) {
		costOtherDao.deleteAll(list) ;
	}

	public void deleteById(Serializable id) {
		costOtherDao.deleteById(id) ;
		
	}

	public List<CostOther> findAll() {
		return costOtherDao.findAll(new CostOther());
	}

	public List<CostOther> findByCriteria(DetachedCriteria criteria) {
		return costOtherDao.findByCriteria(criteria);
	}

	public CostOther findById(Serializable id) {
		return costOtherDao.findById(id);
	}

	public List<CostOther> findByProperty(String propertyName, Object value) {
		return costOtherDao.findByProperty(new CostOther(), propertyName, value);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		return costOtherDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public void save(CostOther entity) {
		costOtherDao.save(entity) ;
	}

	public void update(CostOther entity) {
		costOtherDao.update(entity) ;
	}

}
